#include "stdafx.h"
#include "MyDef.h"
#include "CMain.h"
#include "CDevice.h"
#include "CCamera.h"


void CCamera::Run()
{
	const float ViewAngle = D3DX_PI/4;
	const float Aspect    = 4.0f/3.0f;
	const float nearZ     = 0.1f;
	const float farZ      = 2000.0f;

	D3DXMatrixLookAtLH( &m_View,
						&D3DXVECTOR3( 0, 0, 0),
						&D3DXVECTOR3( 0, 0, 1),
						&D3DXVECTOR3( 0, 1, 0));
	D3DXMatrixPerspectiveFovLH(&m_Proj, ViewAngle, Aspect, nearZ, farZ);
	DEVICE->SetTransform(D3DTS_VIEW, &m_View);
	DEVICE->SetTransform(D3DTS_PROJECTION, &m_Proj);
						
}